﻿@{
    Layout = null;
}
<script src="~/Scripts/Bootstrap/js/bootstrap-select.js"></script>
<link href="~/Scripts/Bootstrap/css/bootstrap-select.min.css" rel="stylesheet" />

<form id="form_downloadCode" role="form" class="form-horizontal" onkeydown="if(event.keyCode==13){return false;}">
    <div class="form-group">
        <div class="col-xs-2 col-md-2 text-right">
            前缀名:
        </div>
        <div class="col-xs-4 col-md-4">
            <input class="form-control" type="text" id="serialNum" name="serialNum" />
        </div>
        <div class="col-xs-2 col-md-2 text-right">
            <span class="red-700">*</span>起始码:
        </div>
        <div class="col-xs-4 col-md-4">
            <input class="form-control" type="text" id="startCode" name="startCode" />
        </div>
    </div>
</form>
<script>
    $('#form_downloadCode').bootstrapValidator({
        group: '.col-xs-4.col-md-4',
        fields: {
            //serialNum: {
            //    validators: {
            //        notEmpty: {
            //            message: '序列号不能为空'
            //        },
            //        regexp: {
            //            regexp: /^[a-zA-Z]*$/,
            //            message: '序列号为英文'
            //        }
            //    }
            //},
            startCode: {
                validators: {
                    notEmpty: {
                        message: '开始码不能为空'
                    },
                    regexp: {
                        regexp: /^\d+$/,
                        message: '开始码为数字'
                    }
                }
            }
        }
    });
</script>